package com.itsm.service;

import com.itsm.entity.Process;
import com.itsm.service.mapper.ApproveMapper;
import com.itsm.service.mapper.ProcessMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProcessApproveService {
    @Autowired
    private ApproveMapper approveMapper;
    @Autowired
    private ProcessMapper processMapper;

    /**
     * 按照审批人获取所有已审批工单
     * @param name 审批人姓名
     * @return
     */
    public List<Process> getAllApp(String name){
        return processMapper.getAllApp(name);
    }

    public List<Process> getAllUnApp(String name){
        return processMapper.getAllUnApp2(name);
    }

    public List<Process> getAllUnApp1(String name, Integer plant){
        return processMapper.getAllUnApp3(name,plant);
    }
    /**
     * 弃用
     * 获取所有审批的工单
     * @param userid
     * @return
     */
    public List<Process> getAllApprove(String userid){
        return processMapper.getAllApprove(userid);
    }
}



